package com.dh.order.exception;

import com.dh.order.enums.ResultEnum;

import lombok.Getter;

/**
 * 
 * @ClassName: OrderException
 * @Description: TODO
 * @author dinghao
 * @date 2018年11月14日 下午4:22:45
 *
 */
@Getter
public class OrderException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private Integer code;
	
	public OrderException(Integer code, String message) {
		super(message);
		this.code = code;
	}

	public OrderException(ResultEnum resultEnum) {
		super(resultEnum.getMessage());
		this.code = resultEnum.getCode();
	}
	
	
}
